home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0769B.ZIP
/
DEMOSCR2.PRG
< prev
next >
Wrap
Text File
|
1987-10-23
|
3KB
|
72 lines
* clipscrn.prg dBIII jjo Start 10-24-85 Last Update 10-23-87
* library of functions added to clipper
* Functions not in dBASE III or Clipper
* CLEARBOX() : Clear Inside Box Between Top x,y TO Bottom x,y
* : And Fill With Attribute Color
* ROLLDN() : Rolls Down Box Between Top x,y TO Bottom x,y
* : One Line And Fill With Attribute Color
* ROLLUP() : Rolls Up Box Between Top x,y TO Bottom x,y
* : One Line And Fill With Attribute Color
* COLOR2NM() : Converts Color Letters To Numeric Form For
* : Use With Above 3 UDFs
* : Will Only Work With GRB combinations, W, N, and +
* : Cannot Read Clipper Background Attribute From System
* : And Cannot Interpret Backslash Such As GR+/B
*****************************************
* Functions Not In dBASE III Or Clipper *
*****************************************
FUNCTION CLEARBOX
* Syntax: CLEARBOX( <expN1>, <expN2> , <expN3>, <expN4>, <expC5>)
* Return: Clear inside of box from top x,y coordinates
* to bottom x,y coordinates and fills with attribute color
* for background
PARAMETER cl_topx,cl_topy,cl_botx,cl_boty,cl_attr
PRIVATE cl_attrno
cl_attrno = IIF(PCOUNT() = 4, 0, COLOR2NM(cl_attr))
CALL BOXCLS WITH cl_topx,cl_topy,cl_botx,cl_boty, cl_attrno, 0, 6
RETURN ("")
FUNCTION ROLLDN
* Syntax: CLEARBOX( <expN1>, <expN2> , <expN3>, <expN4>, <expC5>)
* Return: Rolls box down from top x,y coordinates to
* bottom x,y coordinates and fills with attribute color
* for background
PARAMETER cl_topx,cl_topy,cl_botx,cl_boty,cl_attr
PRIVATE cl_attrno
cl_attrno = IIF(PCOUNT() = 4, 0, COLOR2NM(cl_attr))
CALL BOXCLS WITH cl_topx,cl_topy,cl_botx,cl_boty, cl_attrno, 1, 7
RETURN ("")
FUNCTION ROLLUP
* Syntax: CLEARBOX( <expN1>, <expN2> , <expN3>, <expN4>, <expC5>)
* Return: Rolls box up from top x,y coordinates to
* bottom x,y coordinates and fills with attribute color
* for background
PARAMETER cl_topx,cl_topy,cl_botx,cl_boty,cl_attrno
PRIVATE cl_attrno
cl_attrno = IIF(PCOUNT() = 4, 0, COLOR2NM(cl_attr))
CALL BOXCLS WITH cl_topx,cl_topy,cl_botx,cl_boty, cl_attrno, 1, 6
RETURN ("")
FUNCTION COLOR2NM
* Syntax: COLOR2NM( <expC>
* Return: Numeric Form Of Typical Clipper Numbers
* eg. COLOR2NM("BG") would return 3 as attribute color
* for conversion for above UDFs
PARAMETER cl_ltr
PRIVATE color_num
cl_ltr = UPPER(cl_ltr)
color_num = 0
color_num = IIF("B" $ cl_ltr, color_num + 1, color_num)
color_num = IIF("G" $ cl_ltr, color_num + 2, color_num)
color_num = IIF("R" $ cl_ltr, color_num + 4, color_num)
color_num = IIF("W" $ cl_ltr, 7 , color_num)
color_num = IIF("N" $ cl_ltr, 0 , color_num)
color_num = IIF("+" $ cl_ltr, color_num + 8, color_num)
RETURN(color_num)
* eof clipscrn.prg